
<extend name="Public/base" />
<block name="style">
    <style type="text/css">

    .btn{

    background: #09c;
}
.btn:hover{
    background: #09c;
}
         .code{
            width: 135px;
            height:40px;
            border:none;
            background: #4BBD00;
            color: #fff;

        }
        .real_status{
            width: 135px;
            height:40px;
            border:none;
            background: #4BBD00;
            color: #fff;

        }
        .form-item{border-bottom: 1px dashed #ccc;padding-top: 5px;padding-bottom: 5px;}
        .item-label{float: left;width: 130px;text-align: right;padding-right: 20px;color: #999;}
        .controls{float: left;}

        #tab1 input{

            background: #F6F6F6;
            border:none;
        }
 /*       #tab2 button{
            width:200px;
            height: 30px;
            line-height: 30px;
            background: #F6F6F6;
            border:0.5px solid #999;
        }*/
        .button {
            /*display: block; */
            font-size: 12px; 
            text-decoration: none!important; 
            font-family: Helvetica, Arial, sans serif;
            padding: 8px 12px; 
            border-radius: 3px; 
            -moz-border-radius: 3px; 
            box-shadow: inset 0px 0px 2px #fff;
            -o-box-shadow: inset 0px 0px 2px #fff;
            -webkit-box-shadow: inset 0px 0px 2px #fff;
            -moz-box-shadow: inset 0px 0px 2px #fff;
        }
        .button:active {
            box-shadow: inset 0px 0px 3px #999;
            -o-box-shadow: inset 0px 0px 3px #999;
            -webkit-box-shadow: inset 0px 0px 3px #999;
            -moz-box-shadow: inset 0px 0px 3px #999;
        }
        .grey {
            color: #444;
            border: 1px solid #d0d0d0;
            background-image: -moz-linear-gradient(#ededed, #e1e1e1);
            background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e1e1e1), to(#ededed));
            background-image: -webkit-linear-gradient(#ededed, #e1e1e1);
            background-image: -o-linear-gradient(#ededed, #e1e1e1);
            text-shadow: 1px 1px 1px #fff;
            background-color: #e1e1e1;
        }
        .grey:hover {
            border: 1px solid #b0b0b0;
            background-image: -moz-linear-gradient(#e1e1e1, #ededed);
            background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ededed), to(#e1e1e1));
            background-image: -webkit-linear-gradient(#e1e1e1, #ededed);
            background-image: -o-linear-gradient(#e1e1e1, #ededed);
            background-color: #ededed;
        }
        .grey:active {border: 1px solid #666;}

        .side-sub-menu > li > .item {
                color: #000;
                font-family: '宋体';
                font-size:15px;padding:0px;
                line-height: 25px;
            }
    .sidebar {
        background: #3697A0;
        position: absolute;
    }   
  
    form .form-item{
        width:50%;
        
    }

     /* 头部Logo,主导航*/
            body{
                color:#000;
                font-family: '宋体';
                font-weight: 900;
            }
            .header {
                background-color:   #3697A0;
                height: 45px;
            }
            /* 主导航 */
            .main-nav a {
                height: 45px;
                color: #150303;
            }
            .main-nav a:hover {
                height: 45px;
                background-color:#70bcf3;
                color: #150303;
            }
            .main-nav .current{
                height: 45px;
                background-color: #70bcf3;
            }
            .main-nav .current a {
                height: 45px;
                background-color: #70bcf3;
                color: #150303;
            }
            .logo{
                height: 45px;
                background: #ccc;
            }
            .sidebar{
                margin-top:-5px;
                background:     #3697A0;
                color: #000;
                position: fixed;
                height: 110%;
                margin-top:-40px;
            }
            .subnav h3{
                color: #000;
            }

            .main-nav {
                /*width:100%;*/
                float: none;
                height: auto;
            }

            .mainnav {
                /*height: auto;*/
                height: 100%;
            }

            .main-nav li{
                float: none;
                width:180px;
            }


    </style>
</block>
<block name="body">
    <div class="main-title cf">
        <h2 style="padding-left: 10px;">{$_list.name} 商户信息</h2>
    </div>
    <!-- 标签页导航 -->
    <div class="tab-wrap" style="position:relative">
        <div class="tab-content">
            <php>
                $LOAN_STATUS = C('LOAN_STATUS');
            </php>
            <ul class="tab-nav nav">
                <li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息 </a></li>
                <li data-tab="tab2" class=""><a href="javascript:void(0);">口碑信息</a></li>
            </ul>

            <input type="hidden" name="uid" id="uid" value="{$_list.uid}">

            <div id="tab1" class="tab-pane in tab1">

                       <div class="form-item cf">
                        <label class="item-label">姓 名：</label>
                        <div class="controls">
                            <input type="text" style="height:30px;" class="text input-large name" readonly="readonly" name="name" value="{$_list.name}">
                        </div>
                        
                    </div>


                    <div class="form-item cf">
                        <label class="item-label">手机号：</label>
                        <div class="controls">
                            <input type="text" style="height:30px;" class="text input-large" name="phone" value="{$_list.phone}">
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">身份证号：</label>
                        <div class="controls">
                            <input type="text" style="height:30px;" class="text input-large identify_No" readonly="readonly" name="identify_No" value="{$_list.identify_No}">
                        </div>
                        
                    </div>

                    <div class="form-item cf">
                        <label class="item-label">身份证正面 ： </label>
                        <div class="controls" style="height:100px;">
                            <empty name="_list['front_pic']">
                                 <span>未上传</span>
                                <else/>
                                <a href="{$_list.front_pic}" target="_blank"><img src="{$_list.front_pic}" style="width: 200px;height: 100px;"></a>
                            </empty>

                        </div>
                    </div>

            </div>




            <div id="tab2" class="tab-pane tab2">
               
                <foreach name="list" item="vo" >
                        <!-- <input type="button" value="{$vo.user_id}"> -->
                        <div class="form-item cf">
                            <!-- <label class="item-label">口碑ID{$key+1}：</label> -->
                            <div class="controls">
                                                               
                                <a href="http://hbxyk.hihaoge.me/index.php?m=Admin&c=Alipay&a=kb_dingdan&id={$vo.user_id}" class="button grey" style="float:left;">{$vo.user_id}</a>
                                    
                                
                                <span style="width:250px;height:40px;line-height:40px;width:100px;float:left;">交易总金额：</span>
                                <span style="width:100px;float:left;line-height:40px;">
                                    <php>
                                        $dingdan=D('Dingdan')->where(['status'=>1,'seller_id'=>$vo['user_id']])->select();
                                        $money=0.00;
                                        foreach($dingdan as $v){
                                            $money=$money+$v['pay_money'];
                                        }
                                        echo $money.'元';
        
                                    </php>
                                </span>
                                <span style="width:250px;height:40px;line-height:40px;width:100px;">今日交易总金额：</span>
                                <span style="width:100px;">
                                    <php>
                                        $time1=strtotime(date("Ymd"));
                                        $time2=strtotime(date("Ymd"))+86400;
                                        $dingdan=D('Dingdan')->where("status=1 and `seller_id`='$vo[user_id]' and `pay_time` between '$time1' and '$time2'")->select();
                                        $money=0.00;
                                        foreach($dingdan as $v){
                                            $money=$money+$v['pay_money'];
                                        }
                                        echo $money.'元';
        
                                    </php>
                                </span>
                            </div>
                            
                        </div>
                </foreach>
            </div>

        <div class="form-item cf">
            <label class="item-label">授权状态：</label>
            <div class="controls" >
                <if condition="$_list.real_status eq 1" >已授权<else/>未授权</if>

            </div>
        </div>


        <div class="form-item cf">
            <label class="item-label">保证金：</label>
            <div class="controls" >
                   <input type="text" id="money" name="money" value="{$_list.money}">

            </div>
        </div>

        <div class="form-item cf">
            <label class="item-label">费率</label>
            <div class="controls" >
                <php>
                    $one=D('Kbsh')->where(['uid'=>$_list['uid']])->find();
                </php>
                   <input type="text" id="rate" name="rate" value="{$one.rate}">

            </div>
        </div>




            
        <div class="form-item">
            <button class="btn submit-btn" id="yes" type="button" >确认授权</button>
            <button class="btn btn-return" id="no" >不予授权</button>
        </div>
          
  
    </div>
    
    <!-- <button type="button" id='kkcs'>短信测试</button> -->
</block>
<block name="script">
    <script type="text/javascript" src="__STATIC__/jquery.dragsort-0.5.1.min.js"></script>
    <script type="text/javascript" charset="utf-8">


        Think.setValue("extend", {$info.extend|default=0});
            //导航高亮
            highlight_subnav('{:U('index')}');


            $(function(){
                showTab();
            })


            $('#yes').click(function(){

                var uid=$('#uid').val();
                var money=$('#money').val();
                var rate=$('#rate').val();
                $.ajax({
                    type:'post',
                    url:"",
                    data:{'real_status':1,'uid':uid,'money':money,'rate':rate},
                    success:function(m){
                        alert(m)
                        location.reload();
                    }
                })
            })

            $('#no').click(function(){
                var uid=$('#uid').val();
                $.ajax({
                    type:'post',
                    url:"",
                    data:{'real_status':0,'uid':uid},
                    success:function(m){
                        alert(m)
                        location.reload();
                    }
                })
            })





    </script>


</block>

